<?php

//access.php
//This file contains all of the configurations related to accessing the CP, including account levels, module access levels and GM access levels.
//This file should probably be looked over carefully to ensure you are giving your GM's the least amount of access they need. 
//This file will allow you to specify the minimum GM level needed to access or perform the required function. Care should be taken in this file!
//If for editing accounts, a GM cannot edit an account who's GM level is equal to or greater than theirs. e.g.: If a level 70 GM tried to delete a level 85 GM's account, it would be denied.

$access = array(
	'minlevel'		=>	40,			//Minimum level needed to access the Admin side of the CP. (ie: be able to see the link to the ACP and login to it)
	'admin'			=> array(		//Min level needed to use certain functions in the Admin side of the CP. Anyone over 'minlevel' setting in this file will be able to see and 
									//login to the ACP. Please keep this in mind when setting this section up.
		'account'	=> array(		//Settings related to viewing/changing accounts
			'view'			=> 65,		//Min level to view all information about an account. (DOES NOT INCLUDE PASSWORD)
			'viewpass'		=> 80,		//Min level to be able to view account password (ignored if MD5 is enabled)
			'edit'			=> 80,		//Min level to be able to edit account details, including: email, account name. (This parameter must be lower than all other edit parameters 
										//in the account module, including IP Ban.)
			'editban'		=> 85,		//Min level to be able to ban an account from the CP.
			'editsex'		=> 85,		//Min level to be able to edit the gender of an account.
			'editpass'		=> 95,		//Min level to be able to change a users password. 
			'editlevel'		=> 99,		//Min level to be able to add or remove GM status from an account. (you cannot remove the status of your own account)
			'add'			=> 75,		//Min level to be able to add an account through the admin side of the CP, bypassing the email auth required of new accounts.
			'del'			=> 99,		//Min level to be able to delete an account. (This is recommended to be admin only. Admins cannot delete each others' accounts.)
			'purge'			=> 99,		//Min level to be able to purge inactive accounts from the system (will remove guilds, characters of that account, items, carts, etc as well)
			'credit'		=> 70,		//Min level to be able to add or remove credits manually from an account. (ignored if item shop is disabled)
			'ipban'			=> 95,		//Min level to IP Ban an account from the CP and the server.
		),
		'character'	=> array(			//Settings related to viewing/changing characters
			'view'		=> 60,			//Min level to view characters.
			'edit'		=> 80,			//Min level to be able to edit anything about a character, not including account it belongs to.
			'editacc'	=> 100,			//Min level to be able to change the account that the character belongs to. (this is defaulted to 100, there is probably no need for this.)
			'resetlook'	=> 60,			//Min level to be able to reset the look, clothes and style of a character (Useful for a character that continually errors 
										//everyone and refuses to change)
			'add'		=> 80,			//Min level to be able to add a character to an account (and give it any stats the GM wants, probably best to keep this at the same level as 'edit')
			'del'		=> 85,			//Min level to be able to delete a character (and any associated guilds, parties, inventories) permanently. 
		),
		'donations'	=>	array(			//Settings related to viewing/changing the donation system (obviously these settings will have no effect if the donation system is off)
			'view'		=> 80,			//Min level to view the list of donation items
			'edit'		=> 80,			//Min level to edit any item shop item
			'add'		=> 80,			//Min level to add items to the item shop for sale
			'del'		=> 80,			//Min level to remove items from the item shop
		),
		'guild'		=>	array(			//Settings related to viewing/changing guilds
			'view'		=> 70,			//Min level to view a guild's details
			'edit'		=> 80,			//Min level to edit a guild's information (NOT including, ownerships of castles, memberlist and guild leader) 
										//(this setting must be lower than all of the 'edit' settings related to guilds.)
			'editcastle'	=> 95,		//Min level to edit the castle ownerships for the guild.
			'editmaster'	=> 90,		//Min level to edit the guild master of a guild.
			'editmember'	=> 90,		//Min level to add or remove members of a guild.
			'del'			=> 90,		//Min level to remove a guild, it's members and it's castle ownership information.
		),
		'notice'	=>	array(			//Settings related to the announcement/news system
			'add'		=> 50,			//Min level to be able to add an accountment.
			'edit'		=> 50,			//Min level to edit announcements.
			'del'		=> 80,			//Min level to delete any announcements.
		),
		'ftp'		=>	95,				//Min level to access the FTP system.
		'query'		=>	99,				//Min level to enter a raw query to the database. (NOTE: Enable this CAREFULLY. one wrong move could damage your database!)
		'backups'	=>	98,				//Min level to take a backup of the database and save it to their machine or to your remote FTP location.
	),
	'user'		=>	array(		//This section controls who has access to what. Here are the level breakdowns:
								//-2 = Everyone
								//-1 = Not logged in
								//0 = Logged in
		'Main Menu'			=>	array(
			'Home'				=>	-1,
			//'Forums'			=>	-1,
		),
		'Account'			=>	array(
			'Register'			=>	-1,
			'My Account'		=>	0, //be able to view account information. Editing account details is located in myst.php.
			'Login'				=>	-1,
			'Logout'			=>	0,
			'History'			=>	0,
		),
		'Character'			=>	array(
			'Who\'s Online'		=>	-2,
			'Reset Character'	=>	0,
			'Guild Management'	=>	0, //will only appear if at least one character on the account is the 'moderator' of a guild.
			'Character Management'	=> 0,
		),
		'Donation'			=>	array(
			'Donate!'			=>	-2,
			'Item Shop'			=>	-2,
			'Logs'				=>	0, //Depends on logging donation setting in myst.php
		),
		'Information'		=>	array(
			'Character Ladder'	=>	-2,
			'Guild Ladder'		=>	-2,
			'Server Info/Status'	=> -2,
		),
		'Database'			=>	array(
			'Item Database'		=>	-2,
			'Mob Database'		=>	-2
		),
	),
);